<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTeachingActivityTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('teaching_activity', function (Blueprint $table) {
//            $table->comment('教研活动表');
            $table->bigIncrements('id')->comment('ID');
            $table->bigInteger('activity_id')->comment('activity_info关联ID');
            $table->integer('live_id')->nullable()->default(0)->comment('直播资源关联ID');
            $table->boolean('teaching_type')->nullable()->default(false)->comment('教研形式：1-在线，2-离线');
            $table->string('activity_level', 64)->default('')->comment('级别');
            $table->boolean('is_sign')->nullable()->default(true)->comment('是否签到：1-是，2-否');
            $table->char('activity_type', 4)->nullable()->default('')->comment('活动类别,关联字典数据');
            $table->boolean('is_open')->nullable()->default(false)->comment('公开课：1-是，2-否');
            $table->text('content')->nullable()->comment('教研内容');
            $table->string('place', 255)->nullable()->default('')->comment('地址');
            $table->text('video_link')->nullable()->comment('视频链接');
            $table->dateTime('created_at')->nullable()->comment('创建时间');
            $table->dateTime('updated_at')->nullable()->comment('更新时间');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('teaching_activity');
    }
};
